package com.ruoyi.books.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.books.mapper.BooksHonorMapper;
import com.ruoyi.books.domain.BooksHonor;
import com.ruoyi.books.service.IBooksHonorService;

/**
 * 非遗荣誉Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-30
 */
@Service
public class BooksHonorServiceImpl implements IBooksHonorService 
{
    @Autowired
    private BooksHonorMapper booksHonorMapper;

    /**
     * 查询非遗荣誉
     * 
     * @param honorId 非遗荣誉主键
     * @return 非遗荣誉
     */
    @Override
    public BooksHonor selectBooksHonorByHonorId(Long honorId)
    {
        return booksHonorMapper.selectBooksHonorByHonorId(honorId);
    }

    /**
     * 查询非遗荣誉列表
     * 
     * @param booksHonor 非遗荣誉
     * @return 非遗荣誉
     */
    @Override
    public List<BooksHonor> selectBooksHonorList(BooksHonor booksHonor)
    {
        return booksHonorMapper.selectBooksHonorList(booksHonor);
    }

    /**
     * 新增非遗荣誉
     * 
     * @param booksHonor 非遗荣誉
     * @return 结果
     */
    @Override
    public int insertBooksHonor(BooksHonor booksHonor)
    {
        return booksHonorMapper.insertBooksHonor(booksHonor);
    }

    /**
     * 修改非遗荣誉
     * 
     * @param booksHonor 非遗荣誉
     * @return 结果
     */
    @Override
    public int updateBooksHonor(BooksHonor booksHonor)
    {
        return booksHonorMapper.updateBooksHonor(booksHonor);
    }

    /**
     * 批量删除非遗荣誉
     * 
     * @param honorIds 需要删除的非遗荣誉主键
     * @return 结果
     */
    @Override
    public int deleteBooksHonorByHonorIds(Long[] honorIds)
    {
        return booksHonorMapper.deleteBooksHonorByHonorIds(honorIds);
    }

    /**
     * 删除非遗荣誉信息
     * 
     * @param honorId 非遗荣誉主键
     * @return 结果
     */
    @Override
    public int deleteBooksHonorByHonorId(Long honorId)
    {
        return booksHonorMapper.deleteBooksHonorByHonorId(honorId);
    }
}
